home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Software / Vyzkuste / xsetup / _SETUP.2 / Group3 / XQ FileShellEx.xpl < prev    next >
Text File  |  1999-10-10  |  2KB  |  78 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="1"
  3. "COUNT"="4"
  4. "UIPATH"="Appearance\Explorer\Context Menu"
  5. "NAME"="Files Commands"
  6. "VERSION"="1.00"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="1) Name:"
  9. "TEXT 2"="1) Command:"
  10. "TEXT 3"="2) Name:"
  11. "TEXT 4"="2) Command:"
  12. "DESCRIPTION 1"="This plug-in can be used to add two commands to the context menu that appears if you right-click ANY file in the Explorer."
  13. "DESCRIPTION 2"="First, enter a name for the command (e.g. "View with Notepad") in the field "Name". Then enter the command that should be executed if this item is selected in the field "Command". The name of the current file can be inserted through "%1" (e.g. notepad.exe "%1")."
  14. "DESCRIPTION 3"="To remove the command again, clear both the "Name" and the "Command" field and press "Apply"."
  15. "DESCRIPTION 4"="An example:"
  16. "DESCRIPTION 5"="1) Name:        View with Notepad"
  17. "DESCRIPTION 6"="1) Command:  notepad.exe "%1""
  18. "AUTHOR"="Xteq Systems"
  19. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  20. "COMMENT 1"="For more information, go to http://www.xteq.com"
  21. "COMMENT 2"="Thanks to Jimmy [mailto:j.helena@attglobal.net] for the idea."
  22.  
  23.  
  24. sPath1="HKCR\*\Shell\XQXSETCMD1\"
  25. sPath2="HKCR\*\Shell\XQXSETCMD2\"
  26. sCMD="Command\@"
  27. Sub Plugin_Initialize
  28.  s=RegReadValue(sPath1 & sCMD)
  29.  if len(s)>0 then
  30.   s=RegReadValue(sPath1 & "@")
  31.   SetUIElement 1,s
  32.  
  33.   s=RegReadValue(sPath1 & sCMD)
  34.   SetUIElement 2,s
  35.  end if
  36.  
  37.  s=RegReadValue(sPath2 & sCMD)
  38.  if len(s)>0 then
  39.   s=RegReadValue(sPath2 & "@")
  40.   SetUIElement 3,s
  41.  
  42.   s=RegReadValue(sPath2 & sCMD)
  43.   SetUIElement 4,s
  44.  end if
  45. End Sub
  46.  
  47. Sub Plugin_CheckData(ElementIndex)
  48. End Sub
  49.  
  50. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  51.  s1=GetUIElement(1)
  52.  s2=GetUIElement(2)
  53.  if len(s1)>0 or len(s2)>0 then
  54.   Call RegWriteValue(sPath1 & sCMD,s2,1)
  55.   Call RegWriteValue(sPath1 & "@",s1,1)
  56.  else
  57.   if IsEmpty(RegReadValue(sPath1 & sCMD))=false then
  58.    Call RegDeletePath(sPath1 & "Command")
  59.    Call RegDeletePath(sPath1)
  60.   end if
  61.  end if
  62.  
  63.  s1=GetUIElement(3)
  64.  s2=GetUIElement(4)
  65.  if len(s1)>0 or len(s2)>0 then
  66.   Call RegWriteValue(sPath2 & sCMD,s2,1)
  67.   Call RegWriteValue(sPath2 & "@",s1,1)
  68.  else
  69.   if IsEmpty(RegReadValue(sPath2 & sCMD))=false then
  70.    Call RegDeletePath(sPath2 & "Command")
  71.    Call RegDeletePath(sPath2)
  72.   end if
  73.  end if
  74. End Sub
  75.  
  76. Sub Plugin_Terminate 
  77. End Sub
  78.